//
//  NSString+ISString.h
//  iSocket
//
//  Created by lhj on 1/21/16.
//  Copyright © 2016 boer. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSString (ISString)

//判断是否有特殊字符
+(BOOL)IsSpecialCharacter:(NSString *)str;

//判断是否有中文
+(BOOL)IsChinese:(NSString *)str;

// 判断是否全是中文
+(BOOL)checkIsAllChinese:(NSString *)string;

//验证邮箱是否符合规则
+(BOOL)validateEmail:(NSString *)email;

//验证手机号是否符合规则
+(BOOL)validatePhone:(NSString *)phone;

// 验证是否只包含字母和数字
+(BOOL)validateLetterAndNumber:(NSString *)string;

//验证只能输入数字
+(BOOL)validateNumber:(NSString *)string;

//去掉字符串中的"()-"和空格(\\s)
+(NSString *)phoneRegexReplac:(NSString *)phone;

// MD5加密
- (NSString *)MD5;

// 转换16进制字符串为data
- (NSData *)convertHexStrToData;

// 转换data为十六进制字符串
+ (NSString *)convertDataToHexStr:(NSData *)data;

// 普通字符串转十六进制字符串
- (NSString *)hexStringFromString;

// 十进制转化为十六进制
+ (NSString *)ToHex:(uint16_t)tmpid;

@end
